package com.igeek;



import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.*;
//必须引用javax.validation这个包下的NotNull注解才会起作用

//import com.sun.istack.internal.NotNull;

/**
 * @author jerry
 */
@Data
@ApiModel(description="用户实体")
@AllArgsConstructor
@NoArgsConstructor
public class User {

    @ApiModelProperty("用户编号")
    private Long id;

    @NotNull
    @ApiModelProperty("用户姓名")
    @Size(min = 2, max = 5)
    private String name;

    @NotNull
    @Max(100)
    @Min(10)
    @ApiModelProperty("用户年龄")
    private Integer age;

    @NotNull
    @Email
    @ApiModelProperty("用户邮箱")
    private String email;

}